<ui:composition template="/WEB-INF/templates/templateMedico.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

	<ui:define name="conteudo">
		<h:form id="form">
			<p:panel id="panel" header="Solicitação de Exame">
				<h:inputHidden value="#{exameBean.exame.id}" />
				<h:panelGrid columns="3">
					<p:outputLabel value="Nome Paciente: " for="paciente" />
					<p:inputText id="paciente" value="#{exameBean.exame.paciente.cartao.codigo_cartao}"
						required="true" />
					<p:message for="paciente" />
					
					<p:outputLabel value="CRM medico Solicitante" for="medcli" />
					<p:inputText id="medcli" value="#{exameBean.exame.medicoClinica.nome}"
						required="true" />
					<p:message for="medcli" />
					
					<p:outputLabel value="Medico Responsavel pelo Exame" for="medLab" />
					<p:inputText id="medLab" value="#{exameBean.exame.medicoLaboratorio.nome}"
						required="true" />
					<p:message for="medLab" />

					<p:outputLabel value="Nome da Instituição: " for="instituicao" />
					<p:inputText id="instituicao"
						value="#{exameBean.exame.laboratorio.nome}" />
					<p:message for="instituicao" />
	
				</h:panelGrid>
				<p:commandButton value="Cadastrar"  onclick="teste.click()"
					actionListener="#{exameBean.add}" update="form" />
				<p:commandButton value="Cadastrar"  id="teste"
					actionListener="#{exameBean.add}" update="form" />
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>